package org.jfk.sys.user;

import org.apache.log4j.Logger;
import org.jfk.core.model.BaseModel;
import org.jfk.core.model.SqlFilter;

import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Table;
import com.jfinal.plugin.activerecord.TableMapping;

/**
 * 
 * @author jxf
 * 2014年10月30日
 */

@SuppressWarnings("serial")
public class User extends  BaseModel<User> {
	private static Logger logger = Logger.getLogger(User.class);	
	public static final User dao;
	public static final Table table;
	public static final String tableName;
	static {
		dao = new User();
		table = TableMapping.me().getTable(User.class);
		tableName = table.getName();
	}
	
	public User findByLoginName(String loginName){
		return dao.findFirst("select a.* from "+tableName+" a where a.userName = ?", loginName);
	}
	
}
